//use this test should download libtap from github.com
//download url:https://github.com/zorgnax/libtap

/*
 gcc -g3 -o test-setting-windown test-setting-windown.c \
../vcd-setting-window/vcd-setting-window.c \
../vcd-setting-window/setting-main/vcd-sys-upgrade.c \
../vcd-setting-window/setting-main/vcd-sound.c \
../vcd-setting-window/setting-main/vcd-display.c \
../vcd-setting-window/setting-main/vcd-sys-info.c \
../vcd-setting-window/setting-main/vcd-login-setting.c \
../vcd-setting-window/setting-main/vcd-setting-main.c \
../vcd-setting-window/setting-network/vcd-setting-network.c \
../vcd-setting-window/setting-diagnosis/vcd-diagnosis.c \
../vcd-setting-window/setting-close/vcd-setting-close.c \
../vcd-setting-window/setting-network/vcd-node.c \
../vcd-setting-window/setting-network/vcd-wifi.c \
../vcd-setting-window/setting-network/vcd-wire.c \
../vcd-common.c \
../vcd-log.c \
../vcd-conf/vcd-conf.c \
-lssl -lcrypto \
 `pkg-config --cflags --libs gtk+-3.0 glib-2.0`

*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>
#include <openssl/evp.h>
#include <openssl/md5.h>
#include <ctype.h>
#include <unistd.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <glib/gprintf.h>
#include <glib/gi18n.h>

#include "../vcd-log.h"
#include "../vcd-conf/vcd-conf.h"
#include "../vcd-setting-window/vcd-setting-window.h"

int main(int argc, char **argv) {
  gtk_init(&argc, &argv);

  log_init();
  int res = read_vcd_conf();
  if(res != 0){
      printf("read_vcd_conf fail\n");
      return -1;
  }

  create_setting_window();


  gtk_main();
  return 0;

  GtkWidget *win;
  gtk_init(&argc, &argv);
  win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title(GTK_WINDOW(win), "Hello there");
  g_signal_connect(win, "destroy", G_CALLBACK(gtk_main_quit), NULL);
  gtk_widget_show(win);
  gtk_main();
  return 0;
}
